package com.biz.primus.auth.feign;

import com.biz.primus.common.vo.SpringPageVO;
import com.biz.primus.model.sso.account.vo.UserReqVo;
import com.biz.primus.model.sso.account.vo.UserVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by younger on 17/11/7.
 */
@FeignClient(qualifier = "userFeignClient", name = "service-sso-auth", fallback = UserDegradedFeignClient.class)
public interface UserFeignClient {

    /**
     * 获取用户列表
     */
    @PostMapping("soa/userService/listUser")
    public SpringPageVO<UserVo> listUser(@RequestBody UserReqVo userReqVo);

    /**
     * 获取用户实体
     */
    @PostMapping("soa/userService/getUser")
    public UserVo getUser(@RequestParam(name = "id") Long id);

    /**
     * 创建一个用户
     */
    @PostMapping("soa/userService/createUser")
    public void createUser(@RequestBody UserVo userVo);
}
